<?php

class Kd_Html_Grid_Cell_Button extends Kd_Html_Grid_Cell_Text {

    private $_script = '';

    public function __construct(){
        parent::__construct();
        $this->templateName = 'grid/cell/button';
    }

    public function setScript($value){
        $this->_script = $value;
        return $this;
    }
    public function getScript(){
        return $this->_script;
    }

    protected function render(){
        return '<a href="javascript:void(0)" onclick="javascript:'.$this->getScript().'"><span>'.$this->getCellText().'</span></a>';
    }
}